import models
from google.appengine.ext import webapp
from google.appengine.ext import db
from google.appengine.ext.webapp.util import run_wsgi_app
from protorpc.transport import urlfetch
class dbRecords(webapp.RequestHandler):
    def get(self):
        
        ################### Add Dish Types ##################
        dishType_dessert = models.DishType(name="Dessert");
        #dishType_dessert.img = db.Blob(urlfetch.Fetch("http://1.bp.blogspot.com/_hlVbJqpN_yg/SWsX4zXAWdI/AAAAAAAAAMk/VulgDqQ9cBs/s320/mcroyal.jpg").content)
        dishType_dessert.put();
        
        dishType_meat = models.DishType(name="Meat");
        #dishType_meat.img = db.Blob(urlfetch.Fetch("http://1.bp.blogspot.com/_hlVbJqpN_yg/SWsX4zXAWdI/AAAAAAAAAMk/VulgDqQ9cBs/s320/mcroyal.jpg").content)
        dishType_meat.put();
        
        dishType_pasta = models.DishType(name="Pasta");
        #dishType_pasta.img = db.Blob(urlfetch.Fetch("http://1.bp.blogspot.com/_hlVbJqpN_yg/SWsX4zXAWdI/AAAAAAAAAMk/VulgDqQ9cBs/s320/mcroyal.jpg").content)
        dishType_pasta.put();
        
        dishType_pizza = models.DishType(name="Pizza");
        #dishType_pizza.img = db.Blob(urlfetch.Fetch("http://1.bp.blogspot.com/_hlVbJqpN_yg/SWsX4zXAWdI/AAAAAAAAAMk/VulgDqQ9cBs/s320/mcroyal.jpg").content)
        dishType_pizza.put();
                
        #Add dish types
        dishType_poultry = models.DishType(name="Poultry");
        #dishType_poultry.img = db.Blob(urlfetch.Fetch("http://1.bp.blogspot.com/_hlVbJqpN_yg/SWsX4zXAWdI/AAAAAAAAAMk/VulgDqQ9cBs/s320/mcroyal.jpg").content)
        dishType_poultry.put();
        
        dishType_salad = models.DishType(name="Salad");
        #dishType_salads.img = db.Blob(urlfetch.Fetch("http://1.bp.blogspot.com/_hlVbJqpN_yg/SWsX4zXAWdI/AAAAAAAAAMk/VulgDqQ9cBs/s320/mcroyal.jpg").content)
        dishType_salad.put();
        
        dishType_sandwich = models.DishType(name="Sandwich");
        #dishType_sandwich.img = db.Blob(urlfetch.Fetch("http://1.bp.blogspot.com/_hlVbJqpN_yg/SWsX4zXAWdI/AAAAAAAAAMk/VulgDqQ9cBs/s320/mcroyal.jpg").content)
        dishType_sandwich.put();
        
        dishType_seafood = models.DishType(name="Seafood");
        #dishType_seafood.img = db.Blob(urlfetch.Fetch("http://1.bp.blogspot.com/_hlVbJqpN_yg/SWsX4zXAWdI/AAAAAAAAAMk/VulgDqQ9cBs/s320/mcroyal.jpg").content)
        dishType_seafood.put();

        dishType_soup = models.DishType(name="Soup");
        #dishType_soup.img = db.Blob(urlfetch.Fetch("http://1.bp.blogspot.com/_hlVbJqpN_yg/SWsX4zXAWdI/AAAAAAAAAMk/VulgDqQ9cBs/s320/mcroyal.jpg").content)
        dishType_soup.put();
        
        ################### Add Ingredient Types ##################
        ingType_dairy = models.IngredientType(name="Dairy");
        ingType_dairy.put();
        ingType_dessert = models.IngredientType(name="Dessert");
        ingType_dessert.put();
        ingType_fruit = models.IngredientType(name="Fruit");
        ingType_fruit.put();
        ingType_meat = models.IngredientType(name="Meat");
        ingType_meat.put();
        ingType_pasta = models.IngredientType(name="Pasta and Rice");
        ingType_pasta.put();
        ingType_pastry = models.IngredientType(name="Pastry");
        ingType_pastry.put();
        ingType_poultry = models.IngredientType(name="Poultry");
        ingType_poultry.put();
        ingType_seafood = models.IngredientType(name="Seafood");
        ingType_seafood.put();
        ingType_spice = models.IngredientType(name="Spice");
        ingType_spice.put();
        ingType_veg = models.IngredientType(name="Vegetables");
        ingType_veg.put();
        
        ################## Add Ingredients ##################
        ## Add Dairy
        ing_blue_cheese = models.Ingredient(name="Blue Cheese", IngredientType=ingType_dairy);
        ing_blue_cheese.put();
        ing_boiled_egg = models.Ingredient(name="Boiled Egg", IngredientType=ingType_dairy);
        ing_boiled_egg.put();
        ing_butter = models.Ingredient(name="Butter", IngredientType=ingType_dairy);
        ing_butter.put();
        ing_cheddar_cheese = models.Ingredient(name="Cheddar Cheese", IngredientType=ingType_dairy);
        ing_cheddar_cheese.put();
        ing_cream_cheese = models.Ingredient(name="Cream Cheese", IngredientType=ingType_dairy);
        ing_cream_cheese.put();
        ing_fried_egg = models.Ingredient(name="Fried Egg", IngredientType=ingType_dairy);
        ing_fried_egg.put();
        ing_gouda_cheese = models.Ingredient(name="Gouda Cheese", IngredientType=ingType_dairy);
        ing_gouda_cheese.put();
        ing_milk = models.Ingredient(name="Milk", IngredientType=ingType_dairy);
        ing_milk.put();
        ing_mozzarella_cheese = models.Ingredient(name="Mozzarella Cheese", IngredientType=ingType_dairy);
        ing_mozzarella_cheese.put();
        ing_swiss_cheese = models.Ingredient(name="Swiss Cheese", IngredientType=ingType_dairy);
        ing_swiss_cheese.put();
        ing_white_cheese = models.Ingredient(name="White Cheese", IngredientType=ingType_dairy);
        ing_white_cheese.put();
        ing_yoghurt = models.Ingredient(name="Yoghurt", IngredientType=ingType_dairy);
        ing_yoghurt.put();
        
        
        ## Add Dessert
        ing_cake = models.Ingredient(name="Cake", IngredientType=ingType_dessert);
        ing_cake.put();
        ing_candy = models.Ingredient(name="Candy", IngredientType=ingType_dessert);
        ing_candy.put();
        ing_chocolate = models.Ingredient(name="Chocolate", IngredientType=ingType_dessert);
        ing_chocolate.put();
        ing_cookie = models.Ingredient(name="Cookie", IngredientType=ingType_dessert);
        ing_cookie.put();
        ing_cupcake = models.Ingredient(name="Cupcake", IngredientType=ingType_dessert);
        ing_cupcake.put();
        ing_icecream = models.Ingredient(name="Icecream", IngredientType=ingType_dessert);
        ing_icecream.put();
        ing_pie = models.Ingredient(name="Pie", IngredientType=ingType_dessert);
        ing_pie.put();
        ing_pudding = models.Ingredient(name="Pudding", IngredientType=ingType_dessert);
        ing_pudding.put();
        ing_tart = models.Ingredient(name="Tart", IngredientType=ingType_dessert);
        ing_tart.put();
        
        ## Add Fruit
        ing_apple = models.Ingredient(name="Apple", IngredientType=ingType_fruit);
        ing_apple.put();
        ing_apricot = models.Ingredient(name="Apricot", IngredientType=ingType_fruit);
        ing_apricot.put();
        ing_avocado = models.Ingredient(name="Avocado", IngredientType=ingType_fruit);
        ing_avocado.put();
        ing_banana = models.Ingredient(name="Banana", IngredientType=ingType_fruit);
        ing_banana.put();
        ing_blackberry = models.Ingredient(name="Blackberry", IngredientType=ingType_fruit);
        ing_blackberry.put();
        ing_blueberry = models.Ingredient(name="Blueberries", IngredientType=ingType_fruit);
        ing_blueberry.put();
        ing_cherry = models.Ingredient(name="Cherries", IngredientType=ingType_fruit);
        ing_cherry.put();
        ing_coconut = models.Ingredient(name="Coconut", IngredientType=ingType_fruit);
        ing_coconut.put();
        ing_fig = models.Ingredient(name="Fig", IngredientType=ingType_fruit);
        ing_fig.put();
        ing_grapefruit = models.Ingredient(name="Grapefruit", IngredientType=ingType_fruit);
        ing_grapefruit.put();
        ing_grape = models.Ingredient(name="Grapes", IngredientType=ingType_fruit);
        ing_grape.put();
        ing_kiwi = models.Ingredient(name="Kiwi", IngredientType=ingType_fruit);
        ing_kiwi.put();
        ing_lemon = models.Ingredient(name="Lemon", IngredientType=ingType_fruit);
        ing_lemon.put();
        ing_mango = models.Ingredient(name="Mango", IngredientType=ingType_fruit);
        ing_mango.put();
        ing_orange = models.Ingredient(name="Orange", IngredientType=ingType_fruit);
        ing_orange.put();
        ing_papaya = models.Ingredient(name="Papaya", IngredientType=ingType_fruit);
        ing_papaya.put();
        ing_passionfruit = models.Ingredient(name="Passionfruit", IngredientType=ingType_fruit);
        ing_passionfruit.put();
        ing_peach = models.Ingredient(name="Peach", IngredientType=ingType_fruit);
        ing_peach.put();
        ing_pear = models.Ingredient(name="Pear", IngredientType=ingType_fruit);
        ing_pear.put();
        ing_pineapple = models.Ingredient(name="Pineapple", IngredientType=ingType_fruit);
        ing_pineapple.put();
        ing_plum = models.Ingredient(name="Plum", IngredientType=ingType_fruit);
        ing_plum.put();
        ing_pomegranate = models.Ingredient(name="Pomegranate", IngredientType=ingType_fruit);
        ing_pomegranate.put();
        ing_pumpkin = models.Ingredient(name="Pumpkin", IngredientType=ingType_fruit);
        ing_pumpkin.put();
        ing_raisin = models.Ingredient(name="Raisin", IngredientType=ingType_fruit);
        ing_raisin.put();
        ing_raspberry = models.Ingredient(name="Raspberry", IngredientType=ingType_fruit);
        ing_raspberry.put();
        ing_starfruit = models.Ingredient(name="Starfruit", IngredientType=ingType_fruit);
        ing_starfruit.put();
        ing_strawberry = models.Ingredient(name="Strawberry", IngredientType=ingType_fruit);
        ing_strawberry.put();
        ing_watermelon = models.Ingredient(name="Watermelon", IngredientType=ingType_fruit);
        ing_watermelon.put();
        
        ## Add Meat
        ing_fillet = models.Ingredient(name="Beef Fillet Mignon", IngredientType=ingType_meat);
        ing_fillet.put();
        ing_steak = models.Ingredient(name="Beef Steak", IngredientType=ingType_meat);
        ing_steak.put();
        ing_burger = models.Ingredient(name="Burger", IngredientType=ingType_meat);
        ing_burger.put();
        ing_kofta = models.Ingredient(name="Kofta", IngredientType=ingType_meat);
        ing_kofta.put();
        ing_burger = models.Ingredient(name="Burger", IngredientType=ingType_meat);
        ing_burger.put();
        ing_lamb = models.Ingredient(name="Lamb", IngredientType=ingType_meat);
        ing_lamb.put();
        ing_sausage = models.Ingredient(name="Sausage", IngredientType=ingType_meat);
        ing_sausage.put();
        ing_veal = models.Ingredient(name="Veal", IngredientType=ingType_meat);
        ing_veal.put();
        
        ## Add Pasta and Rice
        ing_basmati = models.Ingredient(name="Basmati Rice", IngredientType=ingType_pasta);
        ing_basmati.put();
        ing_fettuccine = models.Ingredient(name="Fettuccine", IngredientType=ingType_pasta);
        ing_fettuccine.put();
        ing_noodles = models.Ingredient(name="Noodles", IngredientType=ingType_pasta);
        ing_noodles.put();
        ing_penne = models.Ingredient(name="Penne", IngredientType=ingType_pasta);
        ing_penne.put();
        ing_ravioli = models.Ingredient(name="Ravioli", IngredientType=ingType_pasta);
        ing_ravioli.put();
        ing_spaghetti = models.Ingredient(name="Spaghetti", IngredientType=ingType_pasta);
        ing_spaghetti.put();
        ing_spiral = models.Ingredient(name="Spiral", IngredientType=ingType_pasta);
        ing_spiral.put();
        ing_tagliatelle = models.Ingredient(name="Tagliatelle", IngredientType=ingType_pasta);
        ing_tagliatelle.put();
        ing_rice = models.Ingredient(name="White Rice", IngredientType=ingType_pasta);
        ing_rice.put();
        
        ## Add Pastry
        ing_bagel = models.Ingredient(name="Bagel", IngredientType=ingType_pastry);
        ing_bagel.put();
        ing_bread = models.Ingredient(name="Bread Loaf", IngredientType=ingType_pastry);
        ing_bread.put();
        ing_brown_toast = models.Ingredient(name="Brown Toast", IngredientType=ingType_pastry);
        ing_brown_toast.put();
        ing_bun = models.Ingredient(name="Bun", IngredientType=ingType_pastry);
        ing_bun.put();
        ing_cinnamon_roll = models.Ingredient(name="Cinnamon Roll", IngredientType=ingType_pastry);
        ing_cinnamon_roll.put();
        ing_croissant = models.Ingredient(name="Croissant", IngredientType=ingType_pastry);
        ing_croissant.put();
        ing_danish = models.Ingredient(name="Danish", IngredientType=ingType_pastry);
        ing_danish.put();
        ing_donut = models.Ingredient(name="Donut", IngredientType=ingType_pastry);
        ing_donut.put();
        ing_muffin = models.Ingredient(name="Muffin", IngredientType=ingType_pastry);
        ing_muffin.put();
        ing_pretzel = models.Ingredient(name="Pretzel", IngredientType=ingType_pastry);
        ing_pretzel.put();
        ing_white_toast = models.Ingredient(name="White Toast", IngredientType=ingType_pastry);
        ing_white_toast.put();
        
        ## Add Poultry
        ing_fried_chicken = models.Ingredient(name="Fried Chicken", IngredientType=ingType_poultry);
        ing_fried_chicken.put();
        ing_grilled_chicken = models.Ingredient(name="Grilled Chicken", IngredientType=ingType_poultry);
        ing_grilled_chicken.put();
        ing_kebab = models.Ingredient(name="Kebab", IngredientType=ingType_poultry);
        ing_kebab.put();
        ing_roasted_chicken = models.Ingredient(name="Roasted Chicken", IngredientType=ingType_poultry);
        ing_roasted_chicken.put();
        ing_roasted_duck = models.Ingredient(name="Roasted Duck", IngredientType=ingType_poultry);
        ing_roasted_duck.put();
        ing_roasted_turkey = models.Ingredient(name="Roasted Turkey", IngredientType=ingType_poultry);
        ing_roasted_turkey.put();
        
        ## Add Seafood
        ing_caviar = models.Ingredient(name="Caviar", IngredientType=ingType_seafood);
        ing_caviar.put();
        ing_crab = models.Ingredient(name="Crab", IngredientType=ingType_seafood);
        ing_crab.put();
        ing_fried_fish = models.Ingredient(name="Fried Fish", IngredientType=ingType_seafood);
        ing_fried_fish.put();
        ing_grilled_fish = models.Ingredient(name="Grilled Fish", IngredientType=ingType_seafood);
        ing_grilled_fish.put();
        ing_lobster = models.Ingredient(name="Lobster", IngredientType=ingType_seafood);
        ing_lobster.put();
        ing_mussels = models.Ingredient(name="Mussels", IngredientType=ingType_seafood);
        ing_mussels.put();
        ing_salmon = models.Ingredient(name="Salmon", IngredientType=ingType_seafood);
        ing_salmon.put();
        ing_scallop = models.Ingredient(name="Scallop", IngredientType=ingType_seafood);
        ing_scallop.put();
        ing_shrimp = models.Ingredient(name="Shrimp", IngredientType=ingType_seafood);
        ing_shrimp.put();
        ing_sushi = models.Ingredient(name="Sushi", IngredientType=ingType_seafood);
        ing_sushi.put();
        ing_tuna = models.Ingredient(name="Tuna", IngredientType=ingType_seafood);
        ing_tuna.put();
        
        ## Add Spice
        ing_basil = models.Ingredient(name="Basil", IngredientType=ingType_spice);
        ing_basil.put();
        ing_black_tea = models.Ingredient(name="Black Tea", IngredientType=ingType_spice);
        ing_black_tea.put();
        ing_chili = models.Ingredient(name="Chili", IngredientType=ingType_spice);
        ing_chili.put();
        ing_cilantro = models.Ingredient(name="Cilantro", IngredientType=ingType_spice);
        ing_cilantro.put();
        ing_cinnamon = models.Ingredient(name="Cinnamon", IngredientType=ingType_spice);
        ing_cinnamon.put();
        ing_coffee = models.Ingredient(name="Coffee", IngredientType=ingType_spice);
        ing_coffee.put();
        ing_cumin = models.Ingredient(name="Cumin", IngredientType=ingType_spice);
        ing_cumin.put();
        ing_curry = models.Ingredient(name="Curry", IngredientType=ingType_spice);
        ing_curry.put();
        ing_ginger = models.Ingredient(name="Ginger", IngredientType=ingType_spice);
        ing_ginger.put();
        ing_green_tea = models.Ingredient(name="Green Tea", IngredientType=ingType_spice);
        ing_green_tea.put();
        ing_ketchup = models.Ingredient(name="Ketchup", IngredientType=ingType_spice);
        ing_ketchup.put();
        ing_mayo = models.Ingredient(name="Mayonnaise", IngredientType=ingType_spice);
        ing_mayo.put();
        ing_mint = models.Ingredient(name="Mint", IngredientType=ingType_spice);
        ing_mint.put();
        ing_mustard = models.Ingredient(name="Mustard", IngredientType=ingType_spice);
        ing_mustard.put();
        ing_olive_oil = models.Ingredient(name="Olive Oil", IngredientType=ingType_spice);
        ing_olive_oil.put(); 
        ing_pepper = models.Ingredient(name="Pepper", IngredientType=ingType_spice);
        ing_pepper.put(); 
        ing_rosemary = models.Ingredient(name="Rosemary", IngredientType=ingType_spice);
        ing_rosemary.put();
        ing_saffron = models.Ingredient(name="Saffron", IngredientType=ingType_spice);
        ing_saffron.put(); 
        ing_salt = models.Ingredient(name="Salt", IngredientType=ingType_spice);
        ing_salt.put();
        ing_soy_sauce = models.Ingredient(name="Soy Sauce", IngredientType=ingType_spice);
        ing_soy_sauce.put(); 
        ing_sugar = models.Ingredient(name="Sugar", IngredientType=ingType_spice);
        ing_sugar.put();
        ing_thyme = models.Ingredient(name="Thyme", IngredientType=ingType_spice);
        ing_thyme.put();
        ing_tomato_sauce = models.Ingredient(name="Tomato Sauce", IngredientType=ingType_spice);
        ing_tomato_sauce.put();
        ing_vanilla = models.Ingredient(name="Vanilla", IngredientType=ingType_spice);
        ing_vanilla.put();
        ing_vinegar = models.Ingredient(name="Vinegar", IngredientType=ingType_spice);
        ing_vinegar.put(); 
        ing_white_sauce = models.Ingredient(name="White Sauce", IngredientType=ingType_spice);
        ing_white_sauce.put();
        
        ## Add Vegetables
        ing_asparagus = models.Ingredient(name="Asparagus", IngredientType=ingType_veg);
        ing_asparagus.put();
        ing_broccoli = models.Ingredient(name="Broccoli", IngredientType=ingType_veg);
        ing_broccoli.put();
        ing_carrot = models.Ingredient(name="Carrot", IngredientType=ingType_veg);
        ing_carrot.put();
        ing_celery = models.Ingredient(name="Celery", IngredientType=ingType_veg);
        ing_celery.put();
        ing_corn = models.Ingredient(name="Corn", IngredientType=ingType_veg);
        ing_corn.put();
        ing_cucumber = models.Ingredient(name="Cucumber", IngredientType=ingType_veg);
        ing_cucumber.put();
        ing_eggplant = models.Ingredient(name="Eggplant", IngredientType=ingType_veg);
        ing_eggplant.put();
        ing_garlic = models.Ingredient(name="Garlic", IngredientType=ingType_veg);
        ing_garlic.put();
        ing_green_beans = models.Ingredient(name="Green Beans", IngredientType=ingType_veg);
        ing_green_beans.put();
        ing_green_bell_pepper = models.Ingredient(name="Green Bell Pepper", IngredientType=ingType_veg);
        ing_green_bell_pepper.put();
        ing_green_chili_pepper = models.Ingredient(name="Green Chili Pepper", IngredientType=ingType_veg);
        ing_green_chili_pepper.put();
        ing_lettuce = models.Ingredient(name="Lettuce", IngredientType=ingType_veg);
        ing_lettuce.put();
        ing_mushroom = models.Ingredient(name="Mushroom", IngredientType=ingType_veg);
        ing_mushroom.put();
        ing_olive = models.Ingredient(name="Olive", IngredientType=ingType_veg);
        ing_olive.put();
        ing_onion = models.Ingredient(name="Onion", IngredientType=ingType_veg);
        ing_onion.put();
        ing_parsley = models.Ingredient(name="Parsley", IngredientType=ingType_veg);
        ing_parsley.put();
        ing_peas = models.Ingredient(name="Peas", IngredientType=ingType_veg);
        ing_peas.put();
        ing_pickles = models.Ingredient(name="Pickles", IngredientType=ingType_veg);
        ing_pickles.put();
        ing_potato = models.Ingredient(name="Potato", IngredientType=ingType_veg);
        ing_potato.put();
        ing_radish = models.Ingredient(name="Radish", IngredientType=ingType_veg);
        ing_radish.put();
        ing_red_bell_pepper = models.Ingredient(name="Red Bell Pepper", IngredientType=ingType_veg);
        ing_red_bell_pepper.put();
        ing_red_chili_pepper = models.Ingredient(name="Red Chili Pepper", IngredientType=ingType_veg);
        ing_red_chili_pepper.put();
        ing_spinach = models.Ingredient(name="Spinach", IngredientType=ingType_veg);
        ing_spinach.put();
        ing_squash = models.Ingredient(name="Squash", IngredientType=ingType_veg);
        ing_squash.put();
        ing_tomato = models.Ingredient(name="Tomato", IngredientType=ingType_veg);
        ing_tomato.put();
        ing_turnip = models.Ingredient(name="Turnip", IngredientType=ingType_veg);
        ing_turnip.put();
        ing_yellow_bell_pepper = models.Ingredient(name="Yellow Bell Pepper", IngredientType=ingType_veg);
        ing_yellow_bell_pepper.put();
        ing_zucchini = models.Ingredient(name="Zucchini", IngredientType=ingType_veg);
        ing_zucchini.put();
        
        ################### Add Restaurants ##################
        #Add a new Restaurant called Mcdonalds
        mcdonalds = models.Restaurant(name="McDonalds", locationLong=[30.268801, 31.237221, 29.237221], locationLat=[29.042260, 30.051265, 28.051265] , location=[db.PostalAddress("Mostafa el Nahhas, Nasr city, cairo"), db.PostalAddress("El Rehab, cairo"), db.PostalAddress("El Rehab, cairo")])      
        mcdonalds.put();
        
        #Add a new Restaurant called peking
        peking = models.Restaurant(name="Peking", locationLong=[31.44, 31.2223], locationLat=[29.99, 30.0610] , location=[db.PostalAddress("GUC, cairo"), db.PostalAddress("Maadi, cairo")])      
        peking.put();        
        #Add a new Restaurant called Hardees
        hardees = models.Restaurant(name="Hardees", locationLong=[27.268801, 28.237221], locationLat=[25.042260, 27.051265] , location=[db.PostalAddress("Nasr city"), db.PostalAddress("tahrir")])
        hardees.put();
        #Add a new Restaurant called Pizza Hut
        pizzaHut = models.Restaurant(name="Pizza Hut", location=[db.PostalAddress("Nasr city"), db.PostalAddress("heliopolis")], locationLong=[27.268801, 28.237221], locationLat=[25.042260, 27.051265])
        pizzaHut.put();
        #Add a new Restaurant called Shabrawy
        shabrawy = models.Restaurant(name="Shabrawy", location=[db.PostalAddress("tagamo3"), db.PostalAddress("dokki")], locationLong=[27.268801, 28.237221], locationLat=[25.042260, 27.051265])
        shabrawy.put();
        #Add a new Restaurant called fuddruckers
        fuddruckers = models.Restaurant(name="Fuddruckers", location=[db.PostalAddress("mohandesin"), db.PostalAddress("heliopolis")], locationLong=[27.268801, 28.237221], locationLat=[25.042260, 27.051265])
        fuddruckers.put();
        #Add a new Restaurant called Burger King
        burger_king = models.Restaurant(name="Burger King", location=[db.PostalAddress("Nasr city"), db.PostalAddress("maadi")], locationLong=[27.268801, 28.237221], locationLat=[25.042260, 27.051265])
        burger_king.put();

        ################### Add Dishes ##################
        mcRoyal = models.Dish(name="McRoyal", av_rate=5, no_rate=1 , restaurant=mcdonalds, dishType=dishType_sandwich)
        quarterPounder = models.Dish(name="Quarter Pounder with cheese", av_rate=3, no_rate=2, restaurant=hardees, dishType=dishType_sandwich)
        chicken_noodels = models.Dish(name="Chicken Noodles", av_rate=4, no_rate=2 , restaurant=peking, dishType=dishType_pasta)
        
        mcRoyal.img = db.Blob(urlfetch.Fetch("http://1.bp.blogspot.com/_hlVbJqpN_yg/SWsX4zXAWdI/AAAAAAAAAMk/VulgDqQ9cBs/s320/mcroyal.jpg").content)
        mcRoyal.put();
        
        chicken_noodels.img = db.Blob(urlfetch.Fetch("http://www.bluedragon.com/images/recipes/845-thai-chicken-noodles.jpg").content)
        chicken_noodels.put()
        
        quarterPounder.img = db.Blob(urlfetch.Fetch("http://howmanycaloriesshouldieatadayinfo.com/wp-content/uploads/2011/08/quarter-pounder-300x186.jpg").content)
        quarterPounder.put()
        #Set the ingredients for mcroyal
        mcRoyal.ingredients.append(ing_tomato.key())
        mcRoyal.ingredients.append(ing_burger.key())
        mcRoyal.ingredients.append(ing_cheddar_cheese.key())
        mcRoyal.ingredients.append(ing_onion.key())
        mcRoyal.ingredients.append(ing_pickles.key())
        mcRoyal.ingredients.append(ing_lettuce.key())
        mcRoyal.comments.append("Really good sandwich")
        mcRoyal.comments.append("Makes me full")
        mcRoyal.comments.append("The taste of meat is great")
        mcRoyal.put();
        
        chicken_noodels.ingredients.append(ing_noodles.key())
        chicken_noodels.ingredients.append(ing_onion.key())
        chicken_noodels.ingredients.append(ing_grilled_chicken.key())
        chicken_noodels.comments.append("Real taste of pasta")
        chicken_noodels.comments.append("I really enjoyed eating it :D")
        chicken_noodels.put()
         
        quarterPounder.ingredients.append(ing_cheddar_cheese.key())
        quarterPounder.ingredients.append(ing_burger.key())
        quarterPounder.ingredients.append(ing_onion.key())
        quarterPounder.ingredients.append(ing_pickles.key())
        quarterPounder.ingredients.append(ing_ketchup.key())
        quarterPounder.ingredients.append(ing_mustard.key())
        quarterPounder.comments.append("Sandwich of my dreams")
        quarterPounder.comments.append("The real taste of burger")
        quarterPounder.put();
        
        
#        self.response.out.write(str(mcRoyal.img))
application = webapp.WSGIApplication([('/insert', dbRecords)], debug=True)
  
def main():
    run_wsgi_app(application)
    
if __name__ == "__main__":
    main()
    


        
